package com.example.yichuangyun.utils;

public class UiUtils {

    public static String getProgressState(Integer state) {
        String result = "";
        switch (state) {
            case 10:
                result = "新入库";
                break;
            case 20:
                result = "需跟踪";
                break;
            case 30:
                result = "确认意向";
                break;
            case 40:
                result = "邀约成功";
                break;
            case 50:
                result = "面谈成功";
                break;
            case 60:
                result = "签约成功";
                break;
            case 70:
                result = "丢单";
                break;
            default:
                result = "其他";
                break;
        }
        return result;
    }

    public static String getCallType(int callType) {
        String result = null;
        if (callType == 3) {
            result = "未接";
        } else if (callType == 2) {
            result = "去电";
        } else if (callType == 1) {
            result = "来电";
        } else if (callType == 0) {
            result = "未知";
        }
        return result;
    }

    public static String getSelectLabelType(Integer state) {
        String result = "";
        if (state == 0) {
            result = "易投诉客户";
        } else if (state == 1) {
            result = "同行号码";
        } else if (state == 2) {
            result = "诈骗电话";
        } else if (state == 3) {
            result = "广告推销";
        }
        return result;
    }

    public static String getContactTypeName(int type) {
        String typeName = null;
        switch (type) {
            case 1:
                typeName = "手机号码";
                break;
            case 2:
                typeName = "微信";
                break;
            case 3:
                typeName = "QQ";
                break;
            case 4:
                typeName = "邮箱";
                break;
            case 5:
                typeName = "固定电话";
                break;
        }
        return typeName;
    }

    public static int getContactType(String typeName) {
        int type = 0;
        switch (typeName) {
            case "手机号码":
                type = 1;
                break;
            case "微信":
                type = 2;
                break;
            case "QQ":
                type = 3;
                break;
            case "邮箱":
                type = 4;
                break;
            case "固定电话":
                type = 5;
                break;
        }
        return type;
    }

    /**
     * 获取经营状态
     */
    public static String getManagementStatus(String state) {
        String result;
        switch (state) {
            case "1":
                result = "存续";
                break;
            case "2":
                result = "注销";
                break;
            case "3":
                result = "吊销";
                break;
            case "4":
                result = "撤销";
                break;
            case "5":
                result = "迁出";
                break;
            case "6":
                result = "设立中";
                break;
            case "7":
                result = "清算中";
                break;
            case "8":
                result = "停业";
                break;
            case "9":
            default:
                result = "其他";
                break;
        }
        return result;
    }

    /**
     * 订单状态
     */
    public static String getOrderStatus(Integer state) {
        String result;
        switch (state) {
            case -1:
                result = "已删除";
                break;
            case 0:
                result = "待激活";
                break;
            case 1:
                result = "服务中";
                break;
            case 2:
                result = "服务完成";
                break;
            case 3:
                result = "已关闭";
                break;
            default:
                result = "其他";
                break;
        }
        return result;
    }

    /**
     * 服务状态
     */
    public static String getServiceStatus(int state) {
        String result;
        switch (state) {
            case 0:
                result = "待办";
                break;
            case 1:
                result = "在办";
                break;
            case 2:
                result = "暂停";
                break;
            case 3:
                result = "已办结";
                break;
            case 4:
                result = "已终止";
                break;
            default:
                result = "其他";
                break;
        }
        return result;
    }

    /**
     * 开票状态
     */
    public static String getInvoiceStatus(int state) {
        String result;
        switch (state) {
            case 0:
                result = "待审核";
                break;
            case 1:
                result = "已审核";
                break;
            case 2:
                result = "已开票";
                break;
            case 3:
                result = "已红冲";
                break;
            case 4:
                result = "已作废";
                break;
            default:
                result = "其他";
                break;
        }
        return result;
    }

    /**
     * 收支状态
     */
    public static String getIncomePayStatus(int state) {
        String result;
        switch (state) {
            case 0:
                result = "款项申请审核中";
                break;
            case 1:
                result = "款项申请已驳回";
                break;
            case 2:
                result = "入账审核中";
                break;
            case 3:
                result = "入账已驳回";
                break;
            case 4:
                result = "已入账";
                break;
            case 5:
                result = "入账作废";
                break;
            default:
                result = "其他";
                break;
        }
        return result;
    }
}
